package com.yjhb.android.sbz.tool;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.yjhb.android.sbz.R;


/**
 * 创建者 zx
 * 创建时间 2020/9/3 14:56
 */
public class DialogTool {

    public static Dialog createDialog(Context context,View content){
        final Dialog dialog = new Dialog(context, R.style.mDialog);
        dialog.addContentView(content, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
        dialog.setCancelable(true);
        dialog.setCanceledOnTouchOutside(false);
        return dialog;
    }

}
